Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add react-router SDK #4621

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

LekoArts
Copy link
Member

@LekoArts LekoArts commented Nov 21, 2024

Description

Add @clerk/react-router package to support React Router v7 (https://remix.run/blog/react-router-v7).

Fixes #4641

Architecture

Fundamentally the package was copied from @clerk/remix and then the migration steps were done. I've also switched from the HoC pattern ClerkApp(App) to having the user put our <ClerkProvider> into their app. This gives us more flexibility (and access to loaderData) + it seems to be better for dealing with lazy loading with Suspense in Next.js (so maybe helps here, too).

How to use:

See Docs PR: clerk/clerk-docs#1760

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Copy link

changeset-bot bot commented Nov 21, 2024

🦋 Changeset detected

Latest commit: 0fd2a70

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/react-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Nov 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ⬜️ Skipped (Inspect) Dec 4, 2024 9:04am

@LekoArts
Copy link
Member Author

!snapshot

@clerk-cookie

This comment was marked as outdated.

@LekoArts
Copy link
Member Author

!snapshot

@clerk-cookie

This comment was marked as outdated.

@LekoArts
Copy link
Member Author

!snapshot

@clerk-cookie

This comment was marked as outdated.

@LekoArts
Copy link
Member Author

!snapshot

@clerk-cookie

This comment was marked as outdated.

@LekoArts
Copy link
Member Author

!snapshot

@clerk-cookie

This comment was marked as outdated.

@LekoArts
Copy link
Member Author

LekoArts commented Dec 3, 2024

!snapshot

@clerk-cookie

This comment was marked as outdated.

@LekoArts
Copy link
Member Author

LekoArts commented Dec 3, 2024

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @LekoArts - the snapshot version command generated the following package versions:

Package Version
@clerk/astro 1.5.2-snapshot.v20241203113408
@clerk/backend 1.19.0-snapshot.v20241203113408
@clerk/chrome-extension 2.0.3-snapshot.v20241203113408
@clerk/clerk-js 5.36.1-snapshot.v20241203113408
@clerk/elements 0.19.10-snapshot.v20241203113408
@clerk/clerk-expo 2.3.13-snapshot.v20241203113408
@clerk/expo-passkeys 0.0.11-snapshot.v20241203113408
@clerk/express 1.3.20-snapshot.v20241203113408
@clerk/fastify 2.0.22-snapshot.v20241203113408
@clerk/localizations 3.7.2-snapshot.v20241203113408
@clerk/nextjs 6.6.0-snapshot.v20241203113408
@clerk/nuxt 0.0.7-snapshot.v20241203113408
@clerk/clerk-react 5.17.3-snapshot.v20241203113408
@clerk/react-router 0.0.1-snapshot.v20241203113408
@clerk/remix 4.3.0-snapshot.v20241203113408
@clerk/clerk-sdk-node 5.0.71-snapshot.v20241203113408
@clerk/shared 2.17.2-snapshot.v20241203113408
@clerk/tanstack-start 0.6.0-snapshot.v20241203113408
@clerk/testing 1.3.32-snapshot.v20241203113408
@clerk/themes 2.1.50-snapshot.v20241203113408
@clerk/types 4.35.2-snapshot.v20241203113408
@clerk/ui 0.1.27-snapshot.v20241203113408
@clerk/vue 0.0.11-snapshot.v20241203113408

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/expo-passkeys

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/nuxt

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/react-router

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@clerk/ui

npm i @clerk/[email protected] --save-exact

@clerk/vue

npm i @clerk/[email protected] --save-exact

@LekoArts LekoArts changed the title WIP: Add react-router SDK feat: Add react-router SDK Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

react-router v7 compatibility
3 participants